import { FormSchema } from '/@/components/Form';

export const schemas: FormSchema[] = [
  {
    field: 'account',
    component: 'Input',
    label: '用户名',
    componentProps: {
      placeholder: '请输入用户名',
    },
    required: true,
    dynamicDisabled: ({ values }) => {
      return values.account;
    }
  },
  {
    field: 'password',
    component: 'Input',
    label: '新密码',
    componentProps: {
      placeholder: '请输入新密码',
    }
  },
  {
    field: 'comment',
    component: 'InputTextArea',
    label: '备注',
    componentProps: {
      placeholder: '请输入备注',
      rows: 4,
    },
    required: false,
  },
];

export const formConfig = {
  labelCol: {
    span: 6,
  },
  wrapperCol: {
    span: 16,
  },
  showActionButtonGroup: false,
  schemas: schemas,
  actionColOptions: {
    span: 24,
  },
};
